<?php
namespace app\index\validate;

use think\Validate;

class CompanyCommentAdd extends Validate
{
    protected $rule = [
        'identification'      =>  'require',
        'star_num'       =>  'require|number|in:0,1,2,3,4,5',
        'content'     => 'require|max:150'
    ];

    protected $message  =   [
        'identification.require' => '企业id表示不能为空',
        'star_num.require' => '总体评价不能为空',
        'star_num.number' => '总体评价为整数',
        'star_num.in' => '总体评价取值错误',
        'content.require'   => '评论内容不能为空',
        'content.max' => '评论内容在150个字之内'
    ];
}